from selenium import webdriver
from pprint import pprint
from multiprocessing import Pool
import gevent
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import itertools
from itertools import permutations

ele_list = [(By.XPATH, '//input[@id="kw22"]'), (By.XPATH, '//input[@id="su22"]')]
new_list = list(permutations(ele_list))
print(new_list)
driver = webdriver.Chrome(executable_path=r"C:\00pcao\01soft\chromedriver.exe")
driver.get('https://www.baidu.com')
res_list = list()
for i in new_list:
    for ele in i:
        res = WebDriverWait(driver=driver, timeout=5).until_not(EC.visibility_of_element_located(locator=ele))
        print(res)